import Vue from 'vue'
import Vuex from 'vuex'
import store from './store'
import './app.scss'

Vue.use(Vuex)

const App = {
  store,
  onLaunch() {
    // 设置导航栏标题
    wx.setNavigationBarTitle({
      title: '墨鱼时钟'
    })
  },
  onShow() {
    // 加载保存的设置
    this.$store.dispatch('loadSettings')
  },
  render(h) {
    return h('block', this.$slots.default)
  }
}

export default App
